package org.sgx.gwtsjcl.client;

import com.google.gwt.core.client.JavaScriptObject;

/**
 * Base64 encoding/decoding
 * 
 * @author sg
 * 
 */
public class CodecBase64 extends JavaScriptObject {
	protected CodecBase64() {
	}

	/**
	 * Convert from a bitArray to a base64 string.
	 * 
	 * @param arr
	 * @return
	 */
	public native final String fromBits(BitArrayType arr)/*-{
		return this.fromBits(arr);
	}-*/;

	/**
	 * Convert from a base64 string to a bitArray
	 * 
	 * @param arr
	 * @return
	 */
	public native final BitArrayType toBits(String str)/*-{
		return this.toBits(str);
	}-*/;
}
